package com.cw2.behavioral.visitor;

public class XiaoAi {
    private CPU cpu = new CPU("武汉天气");
    private Disk disk = new Disk("武汉天气");

    void answerQuestion(){
        cpu.work();
        disk.work();
    }

    void acceptUpdate(Vistor vistor){
        vistor.visitCPU(cpu);
        vistor.visitDisk(disk);
    }
}
